package com.libui

import com.libui.thirdpartsdk.SDKManager
import com.libui.thirdpartsdk.share.models.ShareObjectType
import org.junit.Test

import org.junit.Assert.*

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }

    @Test
    fun share_test() {
        assertEquals(ShareObjectType.URL, ShareObjectType.allTypes["miniApp"])
        assertEquals(ShareObjectType.IMAGE, ShareObjectType.allTypes["image"])
        assertEquals(ShareObjectType.FILE, ShareObjectType.allTypes["file"])
        assertEquals(ShareObjectType.MINIAPP, ShareObjectType.allTypes["miniApp"])
        assertEquals(ShareObjectType.CUSTOMIZE, ShareObjectType.allTypes["customize"])
        assertEquals(ShareObjectType.ALL, ShareObjectType.allTypes["all"])
    }

    @Test
    fun login_test() {
        assertEquals(SDKManager.instance.loginInstance(""), null)
    }
}